﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class control_CartLink : System.Web.UI.UserControl
{
    public GioHang gioHang
    {
        get
        {
            try
            {
                if (null != Session["GioHang"])
                {
                    return (GioHang)Session["GioHang"];
                }
                else
                {
                    return new GioHang();
                }
            }
            catch
            {
                return new GioHang();
            }
        }
        set { Session["GioHang"] = value; }
    }
    public string ft()
    {
        if(gioHang.sanPhamList.Count<1)
        {
            return "display:none;";
        }
        return "";
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!Page.IsPostBack)
        {
            lblSoLuong.Text = gioHang.sanPhamList.Count.ToString();
        }
    }
}
